{
  "properties" : { },
  "id" : "32658a2d16794bac956ae818ad0e9701",
  "script" : null,
  "groupId" : "4c0c509172534572bbe1809900aeafa9",
  "name" : "左上角创建集合",
  "createTime" : 1727070999098,
  "updateTime" : 1726305444898,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "updateClassificationBatch",
  "method" : "POST",
  "parameters" : [ ],
  "options" : [ ],
  "requestBody" : "{\r\n    \"classification\": \"测试001\",\r\n    \"ids\": \"1655814210014179371,1655814210014179372\"\r\n}",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": \"更新成功\"\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }
}
================================
import org.apache.commons.lang3.StringUtils;
if(body==null){
   return "更新失败"; 
}
 String classification = body.classification;

        if (StringUtils.isEmpty(classification)) {
            return "分类不能为空";
        }
        List idList = StringUtils.split(body.ids,",");
        List collect = new ArrayList(); 
        idList.map(id -> {
            var mib1 = db.table('ndmp_mib').where().eq('id',id).selectOne();
            if (mib1 != null && StringUtils.isNotEmpty(mib1.kind)) {
                if ("scalar".equals(mib1.kind) || "column".equals(mib1.kind)) {
                    String cla = mib1.classification;
                   // mib1.classification=StringUtils.isNotEmpty(cla) ? cla + "," + classification : classification;
                    if(StringUtils.isNotEmpty(cla)){
                     mib1.classification = cla + "," + classification;
                    } else { 
                      mib1.classification = classification;
                    }
                }
            }
            collect.add(mib1);
        })
        if (collect.size() > 0) {
            if(collect.get(0).id==null || collect.get(0).id==''){
            db.table('ndmp_mib').primary('id',IdUtil.getSnowflakeNextId()).save(body,false);
            return "添加成功";
            }else{
            db.table('ndmp_mib').primary('id').update(collect.get(0),false);
            return "更新成功";
            }
        }
        return "更新失败";